home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_10_04
/
1004093b
< prev
next >
Wrap
Text File
|
1992-02-08
|
594b
|
28 lines
#include <stdio.h>
void push1(int);
void push2(int);
int pop1(void);
int pop2(void);
void dump_stack(void);
main()
{
dump_stack(); push1(10);
dump_stack(); push2(12);
dump_stack(); push1(15);
dump_stack(); push2(34);
dump_stack(); push1(99);
dump_stack(); push2(65);
dump_stack(); printf("stack 1: %d\n", pop1());
dump_stack(); printf("stack 1: %d\n", pop1());
dump_stack(); printf("stack 1: %d\n", pop1());
dump_stack(); printf("stack 2: %d\n", pop2());
dump_stack(); printf("stack 2: %d\n", pop2());
dump_stack(); printf("stack 2: %d\n", pop2());
dump_stack();
return 0;
}